package com.wdd.atcrowdfunding.manager.dao;

import com.wdd.atcrowdfunding.bean.Permission;
import com.wdd.atcrowdfunding.bean.Role;
import com.wdd.atcrowdfunding.bean.User;
import com.wdd.atcrowdfunding.bean.UserExample;
import com.wdd.atcrowdfunding.vo.Data;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface UserMapper {
    long countByExample(UserExample example);

    int deleteByExample(UserExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(User record);

    int insertSelective(User record);

    List<User> selectByExample(UserExample example);

    User selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") User record, @Param("example") UserExample example);

    int updateByExample(@Param("record") User record, @Param("example") UserExample example);

    int updateByPrimaryKeySelective(User record);

    int updateByPrimaryKey(User record);

    User queryUserLogin(Map<String, Object> paramMap);

    List<User> queryList(Map<String, Object> paramMap);

    Integer queryCount(Map<String, Object> paramMap);

    int deleteBatchUserByVO(Data data);

    List<Role> queryAllRole();

    List<Integer> queryRoleByUserid(Integer id);

    List<Permission> queryPermissionByUserid(Integer id);

    User querySelectUserByLoginacct(String loginacct);

    User querySelectUserByUsername(String username);

    User querySelectUserByEmail(String email);
}